// 这是包注释
package main

import (
	"fmt"
	"math/rand"
)

func main() {
	for i := 1; i < 10; i++ {
		for j := 1; j <= i; j++ {
			if j == 1 {
				fmt.Printf("%d*%d=%-2d", j, i, i*j)
			} else {
				fmt.Printf("%d*%d=%-3d", j, i, i*j)
			}
		}
		fmt.Println()
	}
	fmt.Println(`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`)
	sum := 0
	aum := 1
	for i := 1; i < 21; i++ {
		fmt.Printf("%d\t", i)
		fmt.Println(rand.Intn(20) + 1)
		a := rand.Intn(20) + 1 //为随机数赋值
		if a%2 == 0 {
			sum += a
		}
		if a%2 == 1 {
			aum *= a
		}
	}

	fmt.Println(sum, aum)
	fmt.Println(`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`)

	var c = 0
	var d = 1
	for {
		fmt.Println(c, d)
		e := c + d
		c = d
		d = e
		if e > 100 {
			fmt.Println(e)
			break
		}
	}

}
